package com.kaitian.demo.cloud.eureka_client1.feign;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 增加了@RestController就可以通过Postman调用了，否则是404
 * 注解@FeignClient是服务间调用正常，不支持Postman调用
 */
@RestController
@FeignClient(value = "${spring.application.name}", path = "/api-clientFeign")
public interface Client1Feign {

    @LoadBalanced
    @GetMapping("/testRequest")
    default void testRequest() {
        System.out.println("testRequest!");
    }
}
